1. Field of the Invention
The present invention relates to a method of controlling an output operation when output data stored in a memory is read out and transferred to an output unit by direct memory access (DMA).
2. Related Background Art
A conventional printer such as a laser beam printer receives image information, e.g., bit map data, supplied from a host computer or the like, and temporarily develops the image information into a bit image in an internal random access memory (RAM). When a bit image corresponding to, e.g., one page is developed in the internal memory in this manner, this bit image is read out to be printed on, e.g., a recording paper sheet. In such a printer, when a bit image developed in the memory is to be read out and transferred to a mechanical section, if the print speed is low, the transfer rate based on program control by the CPU (central processing unit) of the printer is enough for the transfer operation. In a high-speed printer, however, since data transfer at higher speed is required, print data is read out from the internal memory and transferred to the printing mechanical unit to be printed, by means of, e.g., DMA (direct memory access).
In the conventional printer described above, however, even if, for example, the minimum unit of data to be processed by the printer is 4 bytes (32 bits), the length of one line does not necessarily correspond to a multiple of 4 bytes. If, for example, the data length of one line is (an integer multiple of 4 bytes+1 byte), only 1-byte print data exists in the last 4-byte data storage area of one line, and no data is stored in the area of the remaining 3 bytes. In such a case, an empty area corresponding to 3 bytes is produced in the data storage area of one line.
In such a printer, in the above case, for example, an area corresponding to an integer multiple of 4 bytes as the minimum data unit is ensured as the data storage area of one line. Even if the amount of data to be printed on one line is not an integer multiple of 4 bytes as in the above case, the data storage area of one line is not changed. Therefore, when image data including 4,000 lines per page is to be printed, provided that the data length of one line is not a multiple of 4 bytes as in the above case, an empty area corresponding to 4,000.times.3 bytes=12 Kbytes exists, in the memory, for each image data corresponding to one page. This is because, in the conventional techniques, it is very difficult to store print data in a memory in a packed state without producing empty areas, and processing for such an operation consumes much time. Under the circumstances, however, a large area which is not actually used is ensured in a memory.